import { ApiCall } from "tsrpc";
import { ReqEquipTakeOf, ResEquipTakeOf } from "../../../shared/master/body/PtlEquipTakeOf";
import { player } from "../../../model/fight/body/player";
import { template } from "../../../shared/master/MsgAction";

export default async function (call: ApiCall<ReqEquipTakeOf, ResEquipTakeOf>) {
    call.succ({})
    let user = call.req._player as player;
    let jude = user.remove_equip(call.req.idx);
    if(jude){
        user.sendMsg(template.default,`卸下装备完成.`)
    }else{
        user.sendMsg(template.default,`卸下装备失败.`)
    }
}